< previous page page_236 next page >

Page 236
Major, Minor, and the Revision properties from the Project Properties dialog box as well.
Of course, you need to add text to both the App Description label and the Warning label. You can hard-code this into the Form_Load() event, or you could pull the values from data you place in the FileDescription and Comments properties for the project. So, lets change the Form_Load() event a little bit.
EXERCISE
1. Select Project, <ProjectName> Properties from the Visual Basic menu.
2. Add some text describing your application to the File Description property in the Make tab under the Version Information frame. See Figure 11.14 for an example of the Project Properties window.
3. Add some text for a typical disclaimer to the Comments property in the Make tab under the Version Information frame. For example, Warning, this computer program is protected by copyright law and international treaties.
4. Add the following code to the Form_Load() event:
Private Sub Form_Load()
Me.Caption = "About " & App.Title
lblVersion.Caption = "Version " & App.Major & _
"." & App.Minor & _
"." & App.Revision
lblTitle.Caption = App.Title
lblDescription.Caption = App.FileDescription
lblDisclaimer.Caption = App.Comments
End Sub
analysis.gifIn the lblDescription and lblDisclaimer label controls, you add the App.FileDescription and App.Comments properties, respectively. The App object is automatically filled with the data you entered into the Project Properties dialog box. You dont need to do anything to set these properties, other than enter them at design time. Visual Basic takes care of loading the data into the App object at runtime for you. Youll learn more about the App object in a later chapter.

 
< previous page page_236 next page >

If you like this book, buy it!